package cn.aoyu.test.tools.http;

import java.util.Map;

/**
 * Created by Administrator on 2018\4\3 0003.
 */
class MapToString {

    /**
     * 获取请求参数，并组合成
     *
     * @param params
     * @param strParam
     * @return
     */
    static String getParams(Map<String, Object> params, StringBuffer strParam) {
        for (Map.Entry<String, Object> entry : params.entrySet()) {
            strParam.append(entry.getKey()).append("=").append(entry.getValue()).append("&");
        }
        return strParam.toString().substring(0, strParam.toString().length() - 1);
    }
}
